#ifndef MATRIX_EXCEPION
#define MATRIX_EXCEPION

#include <exception>
#include <sstream>

using namespace std;

/*! Matrix_exception class does exception handling for Matrix class. */
/** Any unauthorized memory access by user is raised using Matrix_exception. **/
//-----------------------------------------------------------------------------
class Matrix_exception:public exception {
	private:
		std::string error_str;
		const int error_no;
	public:
		Matrix_exception(const char* q, const int& error_num=0) :error_str(q), error_no(error_num) {}
		Matrix_exception(std::string n, const int& error_num=0) :error_str(n), error_no(error_num) {}
		~Matrix_exception () throw() {}
		string what() {
			//std::stringstream str;
			//str << error_no;
			//error_str = string("Error : ") + string("(") + str.str() + string(") ") + error_str;
			error_str = string("Error : ") + error_str;
			return error_str;
		}
};

#endif
